From: Jonas Dreßler Date: Mon, 17 Feb 2020 14:35:49 +0000 (+0100) Subject: appDisplay: Rename _redisplay() functions unrelated to BaseAppView X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~751^2^2~163 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=bf2d012e4095825c1a51c159ebdaa11f2989d549;p=gnome-shell.git appDisplay: Rename _redisplay() functions unrelated to BaseAppView The _redisplay() function is usally used for subclasses of BaseAppView which want to implement their own _redisplay() function, having that function name in two classes which have nothing to do with BaseAppView can be quite confusing. Make those names less confusing and call the functions _sync() and _rebuildMenu() instead. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/1011 --- diff --git a/js/ui/appDisplay.js b/js/ui/appDisplay.js index 4241bd7fb..97bf72d6a 100644 --- a/js/ui/appDisplay.js +++ b/js/ui/appDisplay.js @@ -1501,8 +1501,8 @@ var FolderIcon = GObject.registerClass({ this.connect('destroy', this._onDestroy.bind(this)); - this._folder.connect('changed', this._redisplay.bind(this)); - this._redisplay(); + this._folder.connect('changed', this._sync.bind(this)); + this._sync(); } _onDestroy() { @@ -1617,7 +1617,7 @@ var FolderIcon = GObject.registerClass({ this.emit('name-changed'); } - _redisplay() { + _sync() { this._updateName(); this.visible = this.view.getAllItems().length > 0; this.icon.update(); @@ -2440,7 +2440,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu { Main.uiGroup.add_actor(this.actor); } - _redisplay() { + _rebuildMenu() { this.removeAll(); let windows = this._source.app.get_windows().filter( @@ -2557,7 +2557,7 @@ var AppIconMenu = class AppIconMenu extends PopupMenu.PopupMenu { } popup(_activatingButton) { - this._redisplay(); + this._rebuildMenu(); this.open(); } };